import { DateTime } from 'luxon'

import { IconName } from '~/components/designSystem'
import { TToast } from '~/core/apolloClient'

export const POSSIBLE_TOAST: TToast[] = [
  {
    id: 'toast0',
    severity: 'success',
    message: '🍞 Success',
  },
  {
    id: 'toast1',
    severity: 'info',
    message: '🍞 Info',
  },
  {
    id: 'toast2',
    severity: 'danger',
    message: '🍞 Danger',
  },
  {
    id: 'toast3',
    severity: 'success',
    message: '👍 Congrats you did something',
  },
  {
    id: 'toast4',
    severity: 'info',
    message: '👀 I see you',
  },
  {
    id: 'toast5',
    severity: 'danger',
    message: '👿 Please stop doing that',
  },
]

export const tableData: Array<{
  status: string
  id: string
  amount: number
  customer: string
  date: string
}> = [
  {
    status: 'succeeded',
    id: 'ABC-DEF-000-001',
    amount: 1000,
    customer: 'JohnDoe.com',
    date: DateTime.utc(2024, 5, 25).toLocaleString(DateTime.DATE_MED_WITH_WEEKDAY),
  },
  {
    status: 'finalized',
    id: 'GHI-JKL-000-002',
    amount: 50,
    customer: 'DereckSons.org',
    date: DateTime.utc(2021, 10, 1).toLocaleString(DateTime.DATE_MED_WITH_WEEKDAY),
  },
  {
    status: 'pay',
    id: 'MNO-PQR-000-003',
    amount: 2000,
    customer: 'FruitShop Inc',
    date: DateTime.utc(2023, 12, 5).toLocaleString(DateTime.DATE_MED_WITH_WEEKDAY),
  },
  {
    status: 'pay',
    id: 'STW-XYZ-000-004',
    amount: 50000,
    customer: 'Pineapple Corp',
    date: DateTime.utc(2001, 1, 30).toLocaleString(DateTime.DATE_MED_WITH_WEEKDAY),
  },
]

export const chargeTableData: Array<{
  name: string
  job: string
  icon: IconName
}> = [
  {
    name: 'Barney Stinson',
    job: 'We will never know',
    icon: 'plug',
  },
  {
    name: 'Lily Aldrin',
    job: 'Kindergarden teacher',
    icon: 'book',
  },
  {
    name: 'Marshal Eriksen',
    job: 'Lawyer',
    icon: 'bank',
  },
  {
    name: 'Robin Scherbatzki',
    job: 'News anchor',
    icon: 'rocket',
  },
  {
    name: 'Ted Mosby',
    job: 'Architect',
    icon: 'company',
  },
]

export const currentUsageTableData: Array<{
  id: string
  amount: number
  chargeCode: string
  chargeName: string
  hasFilterBreakdown: boolean
  units: number
}> = [
  {
    id: '0',
    chargeName: 'GiB Hours',
    chargeCode: 'memory_heartbeat',
    hasFilterBreakdown: true,
    amount: 1000,
    units: 123,
  },
  {
    id: '1',
    chargeName: 'CPU Hours',
    chargeCode: 'cpu_heartbeat',
    hasFilterBreakdown: false,
    amount: 1000,
    units: 123,
  },
  {
    id: '2',
    chargeName: 'SOC2 Compliance',
    chargeCode: 'compliance',
    hasFilterBreakdown: false,
    amount: 1000,
    units: 123,
  },
  {
    id: '3',
    chargeName: 'Datastores',
    chargeCode: 'datastores',
    hasFilterBreakdown: false,
    amount: 1000,
    units: 123,
  },
  {
    id: '4',
    chargeName: 'Multi Cluster',
    chargeCode: 'multicluster',
    hasFilterBreakdown: false,
    amount: 1000,
    units: 123,
  },
]

export const fakeDataHorizontalTable = [
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-01-31',
    amount_currency: 'USD',
    starting_mrr: 3868,
    ending_mrr: 1112,
    mrr_new: 1792,
    mrr_expansion: 155,
    mrr_contraction: 618,
    mrr_churn: -391,
    mrr_change: 2275,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-02-28',
    amount_currency: 'USD',
    starting_mrr: 715,
    ending_mrr: 3862,
    mrr_new: 710,
    mrr_expansion: 1257,
    mrr_contraction: 2654,
    mrr_churn: -1769,
    mrr_change: 651,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-03-31',
    amount_currency: 'USD',
    starting_mrr: 4598,
    ending_mrr: 3848,
    mrr_new: 4936,
    mrr_expansion: 2540,
    mrr_contraction: 710,
    mrr_churn: -3392,
    mrr_change: 1049,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-04-30',
    amount_currency: 'USD',
    starting_mrr: 1991,
    ending_mrr: 4091,
    mrr_new: 1828,
    mrr_expansion: 1290,
    mrr_contraction: 2203,
    mrr_churn: -1437,
    mrr_change: 4515,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-05-31',
    amount_currency: 'USD',
    starting_mrr: 116,
    ending_mrr: 956,
    mrr_new: 3870,
    mrr_expansion: 1532,
    mrr_contraction: 37,
    mrr_churn: -1154,
    mrr_change: -3415,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-06-30',
    amount_currency: 'USD',
    starting_mrr: 1993,
    ending_mrr: 4459,
    mrr_new: 2490,
    mrr_expansion: 391,
    mrr_contraction: 3814,
    mrr_churn: -4597,
    mrr_change: 2836,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-07-31',
    amount_currency: 'USD',
    starting_mrr: 3872,
    ending_mrr: 3553,
    mrr_new: 3004,
    mrr_expansion: 1219,
    mrr_contraction: -166,
    mrr_churn: -2811,
    mrr_change: 682,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-08-31',
    amount_currency: 'USD',
    starting_mrr: 2957,
    ending_mrr: 880,
    mrr_new: 1608,
    mrr_expansion: -1316,
    mrr_contraction: 3330,
    mrr_churn: -3802,
    mrr_change: 1965,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-09-30',
    amount_currency: 'USD',
    starting_mrr: 4912,
    ending_mrr: 1018,
    mrr_new: -1693,
    mrr_expansion: 480,
    mrr_contraction: 208,
    mrr_churn: -3031,
    mrr_change: 1763,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-10-31',
    amount_currency: 'USD',
    starting_mrr: 4217,
    ending_mrr: -2661,
    mrr_new: 2796,
    mrr_expansion: 2819,
    mrr_contraction: 4552,
    mrr_churn: -1801,
    mrr_change: 834,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-11-30',
    amount_currency: 'USD',
    starting_mrr: -2683,
    ending_mrr: 1617,
    mrr_new: 1543,
    mrr_expansion: 4350,
    mrr_contraction: 4099,
    mrr_churn: -881,
    mrr_change: 2116,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2022-12-31',
    amount_currency: 'USD',
    starting_mrr: 1641,
    ending_mrr: 3853,
    mrr_new: 1853,
    mrr_expansion: 3660,
    mrr_contraction: 2207,
    mrr_churn: -4796,
    mrr_change: -1838,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-01-31',
    amount_currency: 'USD',
    starting_mrr: 3868,
    ending_mrr: 1112,
    mrr_new: 1792,
    mrr_expansion: 155,
    mrr_contraction: 618,
    mrr_churn: -391,
    mrr_change: 2275,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-02-28',
    amount_currency: 'USD',
    starting_mrr: 715,
    ending_mrr: 3862,
    mrr_new: 710,
    mrr_expansion: 1257,
    mrr_contraction: 2654,
    mrr_churn: -1769,
    mrr_change: 651,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-03-31',
    amount_currency: 'USD',
    starting_mrr: -4598,
    ending_mrr: 3848,
    mrr_new: 4936,
    mrr_expansion: -2540,
    mrr_contraction: 710,
    mrr_churn: -3392,
    mrr_change: 1049,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-04-30',
    amount_currency: 'USD',
    starting_mrr: 1991,
    ending_mrr: 4091,
    mrr_new: 1828,
    mrr_expansion: 1290,
    mrr_contraction: 2203,
    mrr_churn: -1437,
    mrr_change: 4515,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-05-31',
    amount_currency: 'USD',
    starting_mrr: 116,
    ending_mrr: 956,
    mrr_new: 3870,
    mrr_expansion: 1532,
    mrr_contraction: -37,
    mrr_churn: -1154,
    mrr_change: 3415,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-06-30',
    amount_currency: 'USD',
    starting_mrr: 1993,
    ending_mrr: 4459,
    mrr_new: 2490,
    mrr_expansion: 391,
    mrr_contraction: 3814,
    mrr_churn: -4597,
    mrr_change: 2836,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-07-31',
    amount_currency: 'USD',
    starting_mrr: 3872,
    ending_mrr: 3553,
    mrr_new: -3004,
    mrr_expansion: 1219,
    mrr_contraction: 166,
    mrr_churn: -2811,
    mrr_change: 682,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-08-31',
    amount_currency: 'USD',
    starting_mrr: 2957,
    ending_mrr: 880,
    mrr_new: 1608,
    mrr_expansion: 1316,
    mrr_contraction: 3330,
    mrr_churn: -3802,
    mrr_change: 1965,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-09-30',
    amount_currency: 'USD',
    starting_mrr: 4912,
    ending_mrr: 1018,
    mrr_new: 1693,
    mrr_expansion: 480,
    mrr_contraction: 208,
    mrr_churn: -3031,
    mrr_change: -1763,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-10-31',
    amount_currency: 'USD',
    starting_mrr: 4217,
    ending_mrr: 2661,
    mrr_new: 2796,
    mrr_expansion: 2819,
    mrr_contraction: 4552,
    mrr_churn: -1801,
    mrr_change: 834,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-11-30',
    amount_currency: 'USD',
    starting_mrr: 2683,
    ending_mrr: 1617,
    mrr_new: -1543,
    mrr_expansion: 4350,
    mrr_contraction: 4099,
    mrr_churn: -881,
    mrr_change: 2116,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2023-12-31',
    amount_currency: 'USD',
    starting_mrr: 1641,
    ending_mrr: -3853,
    mrr_new: 1853,
    mrr_expansion: 3660,
    mrr_contraction: 2207,
    mrr_churn: -4796,
    mrr_change: 1838,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-01-31',
    amount_currency: 'USD',
    starting_mrr: 3868,
    ending_mrr: 1112,
    mrr_new: -1792,
    mrr_expansion: 155,
    mrr_contraction: 618,
    mrr_churn: -391,
    mrr_change: 2275,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-02-29',
    amount_currency: 'USD',
    starting_mrr: -715,
    ending_mrr: 3862,
    mrr_new: 710,
    mrr_expansion: 1257,
    mrr_contraction: 2654,
    mrr_churn: -1769,
    mrr_change: 651,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-03-31',
    amount_currency: 'USD',
    starting_mrr: 4598,
    ending_mrr: 3848,
    mrr_new: 4936,
    mrr_expansion: 2540,
    mrr_contraction: 710,
    mrr_churn: -3392,
    mrr_change: 1049,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-04-30',
    amount_currency: 'USD',
    starting_mrr: 1991,
    ending_mrr: 4091,
    mrr_new: 1828,
    mrr_expansion: 1290,
    mrr_contraction: 2203,
    mrr_churn: -1437,
    mrr_change: 4515,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-05-31',
    amount_currency: 'USD',
    starting_mrr: 116,
    ending_mrr: 956,
    mrr_new: 3870,
    mrr_expansion: 1532,
    mrr_contraction: 37,
    mrr_churn: -1154,
    mrr_change: 3415,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-06-30',
    amount_currency: 'USD',
    starting_mrr: 1993,
    ending_mrr: 4459,
    mrr_new: 2490,
    mrr_expansion: 391,
    mrr_contraction: 3814,
    mrr_churn: -4597,
    mrr_change: 2836,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-07-31',
    amount_currency: 'USD',
    starting_mrr: 3872,
    ending_mrr: 3553,
    mrr_new: 3004,
    mrr_expansion: 1219,
    mrr_contraction: 166,
    mrr_churn: -2811,
    mrr_change: 682,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-08-31',
    amount_currency: 'USD',
    starting_mrr: 2957,
    ending_mrr: -880,
    mrr_new: 1608,
    mrr_expansion: 1316,
    mrr_contraction: 3330,
    mrr_churn: -3802,
    mrr_change: 1965,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-09-30',
    amount_currency: 'USD',
    starting_mrr: 4912,
    ending_mrr: 1018,
    mrr_new: 1693,
    mrr_expansion: 480,
    mrr_contraction: 208,
    mrr_churn: -3031,
    mrr_change: 1763,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-10-31',
    amount_currency: 'USD',
    starting_mrr: 4217,
    ending_mrr: 2661,
    mrr_new: 2796,
    mrr_expansion: 2819,
    mrr_contraction: 4552,
    mrr_churn: -1801,
    mrr_change: -834,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-11-30',
    amount_currency: 'USD',
    starting_mrr: 2683,
    ending_mrr: 1617,
    mrr_new: -1543,
    mrr_expansion: 4350,
    mrr_contraction: 4099,
    mrr_churn: -881,
    mrr_change: 2116,
  },
  {
    organization_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
    end_of_period_dt: '2024-12-31',
    amount_currency: 'USD',
    starting_mrr: 1641,
    ending_mrr: 3853,
    mrr_new: 1853,
    mrr_expansion: 3660,
    mrr_contraction: 2207,
    mrr_churn: -4796,
    mrr_change: 1838,
  },
].map((e) => ({ ...e, id: e.organization_id }))
